import React from 'react';
import CodeBlock from './CodeBlock';

interface CodeHighlightProps {
  code: string;
  language?: string;
}

/**
 * 代码高亮组件（用于显示代码）
 */
const CodeHighlight: React.FC<CodeHighlightProps> = ({ code, language = 'cpp' }) => {
  return (
    <CodeBlock className={`language-${language}`} language={language}>
      {code}
    </CodeBlock>
  );
};

export default CodeHighlight;

